package com.yufeng.collaboration.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yufeng.collaboration.entity.DocumentUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DocumentUserMapper extends BaseMapper<DocumentUser> {
    List<Long> selectDocumentIdsByUserId(Long userId);

    @Select("SELECT user_id FROM document_user WHERE document_id = #{documentId}")
    List<Long> selectUserIdsByDocumentId(Long documentId);
}